<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
	xmlns:ppro="http://packetpro.de/jsf/core"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets" version="2.0">
	<ui:composition template="/layout/templates/common.xhtml">
		<ui:define name="pageTitle">
			<h:outputText value="#{msg.input_header}" />
		</ui:define>
		<ui:define name="pageHeader">
			<h3 align="center"><h:outputText value="#{msg.keylist_header}" /></h3>
		</ui:define>
		<ui:define name="body">
			<f:view contentType="text/html">

				<h:panelGroup rendered="#{changed=='1'}">
					<p />
					<h:outputText styleClass="dauerhaftSpeichern"
						value="#{msg.dauerhaftSpeichern}" />
					<h:graphicImage value="/layout/images/spacer.gif" width="10"
						height="1" />
					<h:commandButton value="#{msg.saveButton}"
						action="#{xmlService.saveXML}" />
				</h:panelGroup>
				<p />
				<h:panelGrid columns="2">
					<h:inputHidden />
					<h:panelGroup>
						<h:inputText size="50" value="#{translationElementBean.newMsgId}" />
						<h:graphicImage value="/layout/images/spacer.gif" width="10"
							height="1" />
						<h:commandButton value="#{msg.addMsgIdButton}"
							action="#{translationElementBean.addNewMsgId}" />
					</h:panelGroup>
					<h:dataTable binding="#{langListBean.dynamicDataTableGroup}" />

					<h:dataTable id="translations"
						value="#{translationElementBean.translationElements}"
						var="translation" border="0" styleClass="table_head"
						columnClasses="do_something">
						<h:column>
							<f:facet name="header">
								<h:outputText value="#{msg.msgValueColumn_header}" />
							</f:facet>
							<h:commandLink id="Edit" action="editTranslation"
								actionListener="#{translationElementBean.selectTranslationElement}">
								<h:outputText value="#{translation.value}" />
								<f:attribute name="transmsgId" value="#{translation.value}" />
							</h:commandLink>
						</h:column>

						<h:column>
							<h:commandButton value="#{msg.delMsgIdButton}"
								onclick="if (!confirm('Sind Sie sicher ?')) return false"
								action="delMsgId"
								actionListener="#{translationElementBean.delMsgId}">
								<f:attribute name="transmsgId" value="#{translation.value}" />
							</h:commandButton>
						</h:column>
					</h:dataTable>

				</h:panelGrid>
			</f:view>
		</ui:define>
	</ui:composition>
</jsp:root>